import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { STColumn } from '@delon/abc/st';
import { _HttpClient } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalService } from 'ng-zorro-antd/modal';
import { ParterClaimAuditListChannelApproveComponent } from '../../../claim-audit/components/channel-approve/channel-approve.component';
import { ParterClaimAuditListChannelRejectComponent } from '../../../claim-audit/components/channel-reject/channel-reject.component';
import { AdviceFeedbackService } from '../../services/advice-feedback.service';

// import { ParterClaimAuditListChannelApproveComponent } from '../channel-approve/channel-approve.component';
// import { ParterClaimAuditListChannelRejectComponent } from '../channel-reject/channel-reject.component';

@Component({
  selector: 'app-parter-feedback-detail-detail',
  templateUrl: './feedback-detail.component.html',
  styleUrls: ['./feedback-detail.component.less']
})
export class ParterAdviceFeedbackDetailComponent implements OnInit {
  id = this.route.snapshot.queryParams.id;
  i: any;
  imges: any;
  isVisible = false;

  constructor(
    private route: ActivatedRoute,
    private msgSrv: NzMessageService,
    public service: AdviceFeedbackService,
    private modalService: NzModalService,
    private router: Router
  ) {}

  ngOnInit(): void {
    this.initData();
  }

  initData() {
    // this.service.request(this.service.$api_getBulkBillDetail, { id: this.id }).subscribe(res => {
    //   if (res) {
    //     this.i = res;
    //
    //   }
    // });
  }

  approve() {
    const modalRef = this.modalService.create({
      nzTitle: '同意',
      nzWidth: 700,
      nzContent: ParterClaimAuditListChannelApproveComponent,
      nzComponentParams: {
        i: this.i
      },
      nzFooter: null
    });
  }
  reject() {
    const modalRef = this.modalService.create({
      nzTitle: '拒绝',
      nzWidth: 700,
      nzContent: ParterClaimAuditListChannelRejectComponent,
      nzComponentParams: {
        i: this.i
      },
      nzFooter: null
    });
  }
  goBack() {
    window.history.go(-1);
  }
}
